package com.patter.demo.factory.abstracts;

/**
 * @Author create by xcb 2023/1/29 14:27
 */
public class FactoryProducer {

    public static AbstractFactory getFactory(String choice) {
        if (choice.equalsIgnoreCase("SHAPE")) {
            return new ShapeFactory();
        } else if (choice.equalsIgnoreCase("COLOR")) {
            return new ColourFactory();
        }
        return null;
    }
}
